//路由配置文件
import React from 'react';
//懒加载
const Main= React.lazy(()=>import("../pages/main"));
const Mask= React.lazy(()=>import("../pages/mask"));
const List= React.lazy(()=>import("../pages/list"));
const Item= React.lazy(()=>import("../pages/item"));
//子页
const Baokuan= React.lazy(()=>import("../pages/main/components/baokuan/Baokuan"));
const Miji= React.lazy(()=>import("../pages/main/components/miji/miji"));
const Remai= React.lazy(()=>import("../pages/main/components/remai/remai"));
const SeachList= React.lazy(()=>import("../pages/searchList/index"));
const Cart= React.lazy(()=>import("../pages/cart/index"));


//路由表信息
const routes=[
    {path:"/main",component:Main,
     children:[
     {path:"/main/baokuan",component:Baokuan,name:"当季爆款"},
     {path:"/main/miji",component:Miji,name:"美白秘籍"},
     {path:"/main/remai",component:Remai,name:"曲家热卖"},

     
 ]
},
    {path:"/mask",component:Mask},
    {path:"/list",component:List},
    {path:"/item",component:Item},
    {path:"/seachList",component:SeachList},
    {path:"/cart",component:Cart},
    {from:"/",to:"/main"}
];
export default routes
